package com.biz.primus.ms.evaluation.feign;

import com.biz.primus.model.depot.vo.DepotRespVo;
import com.biz.primus.ms.evaluation.degraded.DegradedDepotFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Optional;


/**
 * DepotFeignClient
 *
 * @author Tiger Feng
 * @date 2017年10月31日
 */
@FeignClient(qualifier = "depotFeignClient", name = "service-depot", fallback = DegradedDepotFeignClient.class)
public interface DepotFeignClient {

    /**
     * 根据门店编码获取门店信息《从redis中获取指定门店编码的门店》
     * @param depotCode
     * @return
     */
    @GetMapping("soa/depotService/getByDepotCodeFRdb")
    Optional<DepotRespVo> queryByDepotCode(@RequestParam("depotCode") String depotCode);
}
